UZIX 2.0 Installation Guide
===========================
Written by Adriano C. R. da Cunha
Last update: 23/08/2001


Introduction
------------

        In this text is described how you can install UZIX in your MSX.
The installation program is targeted for MSX systems with harddisk, but
you can also install UZIX in a floppy disk.
        Unfortunately, the installation program can't fit into a 720kb
floppy disk due to its size. But if you just wanna run UZIX in your
harddisk-less MSX, check UZIX site for a diskimage. Just copy the
diskimage to a floppy disk and you'll feel the UNIX flavor on your MSX.


What is needed
--------------

        So, that's what you need:

        . a MSX2 or better;
        . a harddisk interface;
	. MSXDOS2 operating system to run installation program;


Unpacking setup files
---------------------

        After you've downloaded the setup files, copy them into any
directory on your harddisk. To check the integrity of the files, run setup
with option '/c'. For example,

        setup /c

        will check if the datafile is not corrupt.
        Choose a directory (or not) where you want to unpack the
installation files. Run setup giving the destination drive (and directory,
if you want). Another example:

        setup d:\uzixinst

        Wait the files be unpacked and switch to the installation
directory. Execute the 'install' program from the MSX-DOS prompt.          
	Setup also recognizes the /O option, that instructs it to not
overwrite existing files in the destination directory.

Installing UZIX
---------------

	The installation program can be aborted at any time by pressing
CONTROL+STOP. Also, at many points, you can press the ESC key to abort
it.

        0. Agree with the terms of use
        ------------------------------

        Read the terms of use displayed on screen. If you not agree with
them, hit 'N' key to abort installation.

        1. Be sure you know what you're doing
        -------------------------------------

        Installation program will ask you some questions to ensure correct
installation of UZIX on your MSX. If you are afraid of these technical
questions, hit 'N' key to abort installation.

        2. Choose between installation or upgrade of UZIX
        -------------------------------------------------

        If you're installing UZIX for the first time on your MSX or want
to complete reinstall the system, hit the 'I' key. If you are upgrading
your UZIX installation, hit the 'U' key.

	3. Select components to install
	-------------------------------

	The installation program will show you a list of the available
components on UZIX installation. Using the cursor keys and the space bar
you can select what components you want to install.
	If you are installing UZIX, the creation of the filesystem,
kernel installation, root tree creation and user environment will be
automatically selected.
	If you are upgrading UZIX, you can't select the (re)creation of
the filesystem. Some questions that are made for installation process will
be skipped.
	Here is an explanation about each component that can be selected:

	.Create UZIX filesystem
	This option will change an existing FAT disk/partition into an
UZIX filesystem. UZIX can't run on FAT filesystem, so this option is
mandatory for a first time installation.

	.Install UZIX kernel
	Install the kernel (and its loader) on the selected
disk/partition. You don't need to install the kernel on every UZIX
disk/partition, but only on bootable ones.

	.Create root tree (/)
	Creates the root tree, including /home, /dev, /tmp, etc. Use
this option only for bootable disks/partitions.

	.Create basic user environment
	Installs the shell, init and login programs, the user environment
variables and basic /etc files. With this you can login on system with a
minimum minimorum environment.

	.Install basic applications
	This will install 40 basic applications, like cp, chown, ls,
mkdir, mount, etc.

	.Install extra applications
	This option will install more 44 applications, like banner,
dosread, doswrite, dosdir, fortune, renice, tar, etc.

	.Install network support
	Installs network support (TCP/IP, PPP and SLIP) on UZIX, including
applications (telnet, ftp, ping, etc).

	.Install manual pages
	Will install all the available manpages for UZIX.

	.Install UZLO boot loader
	After UZIX installation is finished, will launch the UZLO
installation program. UZLO is a program that allows you to choose the
operating system to boot when you turn on your MSX.

	Once you have finished the component selection, press RETURN to
continue or ESC to abort the installation.

        4. Select device, source and destination
        ----------------------------------------

        First, select the disk device on your MSX that will handle the
installed system.
        By now, four disk devices can be selected:
        .Floppy drive;
        .Sunrise ATA-IDE;
        .ESE MegaSCSI;
        .Other disk interface;

        If you select 'Other disk interface', be warned that UZIX
(and installation program) may not boot or behave incorrectly with your
disk interface. If you wanna help UZIX to support your interface,
contact adrcunha@yahoo.com.br.
        Enter the drive letter where the installation files are
located (the drive from where you called installation program).
        Enter the drive letter where you'll install UZIX. Don't worry if
the drive already has a partition selected (if you own a MegaSCSI, it will
be restored after installation is finished; if you own a Sunrise IDE, it
will be restored after the next boot).
	If you are installing UZIX to a floppy disk you can skip the next
two paragraphs.
	Installation program will ask if the destination partition is
already selected on destination drive. If you already selected it or you
aren't using partitions or your harddisk is too small and all existent
partitions are already assigned to drives, answer yes to the question and
skip the next paragraph.
	Now enter the partition number where it will be installed
(MegaSCSI users: enter the partition number in hexadecimal format).
Installation program will ask you to confirm the MSXDOS command to select
the desired partition in the specified drive. If the command is wrong,
correct it and hit RETURN key. After the partition be selected (you can
abort the installation by hitting CONTROL+STOP during the pause after the
partition is selected, if an error occurs), installation program will show
the parameters you entered and will ask you to confirm the partition
selection.
	If the drive/partition you selected contains valid files you will
be warned. You can press V to view the file list, RETURN to continue the
installation and ESC to choose another drive. When viewing the file list,
press a key to return to installation process.
        Next step is to give the partition/drive size. If the
total size of the drive/partition you selected is insufficient for the all
components you selected, you'll be warned and must select another
drive/partition or abort the program. A minimum of 720kb disk/partition is
required to install UZIX.
	Installation program automatically detects the total size of the
drive/partition you selected, but you can enter a lower value if you want.
	If you are installing UZIX on a harddisk and are really sure the
partition you selected, confirm it, by pressing the 'Y' key.
	The drive/partition selected must be free of errors, since UZIX
filesystem can't handle disks with bad blocks yet. If you're installing
UZIX on a floppy disk you can format it, answering 'Y' to the question
'Do you want to call FORMAT?'.
	Once you have finished entering these parameters, press RETURN to
continue the installation or ESC to abort the program.

	5. Advanced settings
	--------------------

	These settings are not intended for average users. It's for
advanced users and/or testers. If this is the first time you're
installing UZIX on your MSX, let the choices as they are (the best choices
for your MSX are already selected).

	Here is a brief explanation about each setting. If you installed
UZIX but still get problems, try playing with them.

	.Force stopdrive workaround
	Some DiskROMs doesn't work well with UZIX. For example, the MSX
Turbo-R DiskROM also have this problem, and it's related to stopping the
drive. If the drive stops spinning, the next access to it returns a 'not
ready' error after a long delay. The workaround avoid this error by
resetting the drive before each read access. The collateral effect of this
workaround is that the floppy access becomes very slow.
	
	.Disable stopdrive countdown
	This option disables the drive countdown that causes the motor to
stop spinning. This option is mandatory for systems with ESE MegaSCSI, or
system will hang up. The collateral effect is that when you access a
floppy disk, the drive will remain spinning forever.

	Now the installation program is almost ready to install UZIX. Press
RETURN to continue or ESC to abort.

	6. Personalized settings
	------------------------

	These settings are intended to personalize some installation
options in UZIX. Like the advanced settings, the best choices for your MSX
are already selected.
	Now, the only personalized setting is the number of TTYs to
create. The many TTYs you create, the many virtual terminals you get in
UZIX, until a maximum handled by the kernel.
	Note that, for each TTY you have, system will launch a login
prompt on it. Each login process uses 16kb of memory. So, the more TTYs
you have, the more memory is consumed (even if you don't use the TTY).
	If your MSX has only 128kb of memory, do not create more than
three TTYs, or system will be out of resources and you won't get even the
shell.

	7. Creating the installation script
	-----------------------------------

	The installation program will create a script, that will really
install UZIX on your system. Once it have finished the creation, press the
RETURN key to continue or the ESC key to abort.
	After script execution, three ways are possible:

	. you installed UZIX on a floppy disk
	To run UZIX, insert the destination disk in your boot drive and
reset your MSX.

	. you didn't select the 'Install UZLO boot loader' component
	To run UZIX, select its partition on your boot drive and reset
your MSX. To boot MSXDOS after booting UZIX your must shutdown it, boot
from floppy-drive, select a bootable MSXDOS partition in your boot
drive and reset your MSX again.

	. you selected the 'Install UZLO boot loader' component
	The UZLO installation program will be executed. Check the next
section.

	In any case, after the installation you can run 'fsck' to check
the UZIX filesystem for errors. Just type 'fsck' in the MSXDOS prompt,
from the drive where the installation files are, followed by the drive
where UZIX is installed (if UZIX is on a harddisk, first select its
partition on the drive). For example:

	fsck d:


Installing UZLO
---------------

	The UZLO installation program can be aborted at any time by
pressing CONTROL+STOP. Also, at many points, you can press the ESC key to
abort the program.
	UZLO bootloader can't be installed under MSXDOS1; it was designed
to run with MSXDOS2. Also, UZLO can't be installed on a floppy disk, for
obvious reasons.
	UZLO installation program can also be executed at any time, by
running 'instuzlo' from the drive where UZIX installation files are.

        0. Select device, source and destination
        ----------------------------------------

	If, when installing UZIX, you selected the component 'Install UZLO
boot loader', you don't need to set these settings again. UZLO installer
already knows them. You can skip to next topic.
        First, select the disk device on your MSX where UZLO will be
installed.
        By now, three disk devices can be selected:
        .Sunrise ATA-IDE;
        .ESE MegaSCSI;
        .Other disk interface;

        If you select 'Other disk interface', be warned that UZIX and UZLO
may not boot or behave incorrectly with your disk interface. If you wanna
help UZIX to support your interface, contact adrcunha@yahoo.com.br.
        Enter the drive letter where the installation files are
located (the drive from where you called UZLO installation program).
	Enter the drive letter where you installed UZIX.
	Installation program will ask if you're using partition change
scheme. If you aren't using partitions or your harddisk is too small and
all existentpartitions are already assigned to drives, answer yes to the
question and skip the next topic.
	Enter the partition number where UZIX was installed (MegaSCSI
users: enter the partition number in hexadecimal format). Be sure you
entered the right partition.

	1. Select boot drive
	--------------------

	UZLO installation program will show you the settings you
entered. If they are right, press 'Y' key. Or press 'N' key to enter them
again.
	Now, enter the drive where your MSX boots from (usually, drive
A). Your boot drive must have enough free space to install UZLO.
	If you aren't using the partition change scheme, skip the next
four paragraphs.
	If you don't own a MegaSCSI interface with ESE-RAM, you must type
the partition number (MegaSCSI users: enter the partition number in
hexadecimal format) where your MSX boots from (usually, partition 0).
	If your boot drive doesn't have its boot partition selected, abort
the program, select it on drive and run UZLO installation program again.
	If you don't own a MegaSCSI interface you must inform to the
program the full location of your partition change utility (don't omit
the drive, path, filename and extension). Installation program will
also ask you to confirm the MSXDOS command to select the desired
partition in the specified drive. If the command is wrong, correct it and
hit RETURN key.
	If your harddisk interface is a MegaSCSI, you must also type the
MegaSCSI drive where UZIX will boot from. This drive can be anyone
handled by MegaSCSI, but can't be your boot drive. This drive letter is
used only for loading UZIX. The partition selected on this drive will be
available again when you boot MSXDOS.
	After entering the necessary parameters, hit the RETURN key to
continue or the ESC key to abort.

	2. Installing UZLO
	------------------

	UZLO installation program will now install it on your system. If
an error occurs the process will be aborted and all the changes are
undone.
	An important remark is about your MSXDOS2.SYS file. Be sure it's a
normal version, or UZLO installation program cannot patch it. If the
patch process can't be done, the installation will be aborted.

	3. Using UZLO
	-------------

	After UZLO is installed, reboot your MSX to check if it's
working. You should see UZLO prompt instead MSXDOS prompt. To boot MSXDOS,
type 'dos' and press the RETURN key. To boot UZIX, type 'uzix' and press
RETURN key. Any other name is not recognized. Press the TAB key at UZLO
prompt to see a list of the acceptable names.
	If you don't enter any name before 3 seconds, MSXDOS will be
booted. If you press the SHIFT key while UZLO loads, MSXDOS will be booted
automatically.
	A last note: UZLO installation program also install the program
'loaduzix' on your boot drive. Call 'loaduzix' at any time from MSXDOS
prompt to run UZIX. One restriction about 'loaduzix' is that it requires
that drive H: must be free. If drive H: has a CDROM drive, for example,
'loaduzix' will not work.


Uninstalling UZLO
-----------------

	To uninstall UZLO, just run the program 'no_uzlo' from the drive
where UZIX installation files are.
	If you're unable to run 'no_uzlo', you must uninstall UZLO files
manually. First you must copy an original version of MSXDOS2.SYS to your
boot drive. Now you can erase the following files:

	MSXDOS2.UZL
	UZLO.Z
	BOOTUZIX.Z
	UZLOEXEC.BAT
	UZLO_DOS.BAT
	UZLOPART.COM
	UZLOUZIX.BAT
	LOADUZIX.BAT
	UZLOCHEK.COM

	All these files have read-only and hidden attributes, so you must
unset them before erasing the files.


Critics, bugs, doubts, comments, corrections, questions
-------------------------------------------------------

        Any comments, help or bug reports will be welcome. Also, if I
wrote something wrong, corrections are also welcome. Please, write to
adrcunha@yahoo.com.br.

        Official UZIX Home Page:
        http://uzix.msx.org

